package com.longqin.wechat.entity;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonInclude;

/**登录后返回的token
 *
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AccessToken implements Serializable{

	private static final long serialVersionUID = 1L;
	
	private String access_token;
	
	private String refresh_token;
	
	private long  expires_in;
	
	private WxUserInfo weChatUserInfo;//用户微信信息
	
	private String userName;
	
	private Integer orgId;
	
	private Integer userId;
	
	public String getUserName() {
		return userName;
	}
	
	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	public AccessToken(){
		super();
	}
	
	public WxUserInfo getWeChatUserInfo() {
		return weChatUserInfo;
	}

	public void setWeChatUserInfo(WxUserInfo weChatUserInfo) {
		this.weChatUserInfo = weChatUserInfo;
	}

	public AccessToken(String access_token, String refresh_token, long expires_in){
		this.access_token = access_token;
		this.refresh_token = refresh_token;
		this.expires_in = expires_in;
	}
	
	public AccessToken(String access_token, String refresh_token, long expires_in, WxUserInfo weChatUserInfo){
		this(access_token, refresh_token, expires_in);
		this.weChatUserInfo = weChatUserInfo;
	}
	
	public AccessToken(String access_token, String refresh_token, long expires_in, WxUserInfo weChatUserInfo,
			String userName, Integer userId, Integer orgId){
		this(access_token, refresh_token, expires_in, weChatUserInfo);
		this.userName = userName;
		this.orgId = orgId;
		this.userId = userId;
	}
	
	public String getAccess_token() {
		return access_token;
	}
	
	public void setAccess_token(String access_token) {
		this.access_token = access_token;
	}
	
	public String getRefresh_token() {
		return refresh_token;
	}
	
	public void setRefresh_token(String refresh_token) {
		this.refresh_token = refresh_token;
	}
	
	public long getExpires_in() {
		return expires_in;
	}
	
	public void setExpires_in(long expires_in) {
		this.expires_in = expires_in;
	}
	
	public Integer getOrgId() {
		return orgId;
	}
	
	public void setOrgId(Integer orgId) {
		this.orgId = orgId;
	}
	
	public Integer getUserId() {
		return userId;
	}
	
	public void setUserId(Integer userId) {
		this.userId = userId;
	}

}
